\hypertarget{classdev_1_1net_1_1_tcp_acceptor}{}\section{dev\+:\+:net\+:\+:Tcp\+Acceptor Class Reference}
\label{classdev_1_1net_1_1_tcp_acceptor}\index{dev\+::net\+::\+Tcp\+Acceptor@{dev\+::net\+::\+Tcp\+Acceptor}}


{\ttfamily \#include $<$Tcp\+Acceptor.\+hpp$>$}

Inheritance diagram for dev\+:\+:net\+:\+:Tcp\+Acceptor\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{classdev_1_1net_1_1_tcp_acceptor}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classdev_1_1net_1_1_tcp_acceptor_a34699ddc95814ad1ca8ccebc86b0456e}{}enum {\bfseries Status} \{ {\bfseries R\+E\+A\+D\+Y} = 1, 
{\bfseries R\+U\+N\+N\+I\+N\+G}, 
{\bfseries E\+X\+I\+T\+I\+N\+G}, 
{\bfseries E\+X\+I\+T}
 \}\label{classdev_1_1net_1_1_tcp_acceptor_a34699ddc95814ad1ca8ccebc86b0456e}

\item 
\hypertarget{classdev_1_1net_1_1_tcp_acceptor_adf406170ea5e4164ea5b67fc0d2cfe75}{}typedef boost\+::function$<$ Tcp\+Connection\+Ptr \&(sock\+\_\+t)$>$ {\bfseries Rtn\+Tcp\+Connection\+Ptr\+Ref\+C\+B}\label{classdev_1_1net_1_1_tcp_acceptor_adf406170ea5e4164ea5b67fc0d2cfe75}

\item 
\hypertarget{classdev_1_1net_1_1_tcp_acceptor_a3ba04711a4120af7ba46157f8ba122c8}{}typedef boost\+::function$<$ void(Tcp\+Connection\+Ptr \&)$>$ {\bfseries Pass\+Tcp\+Connection\+Ptr\+Ref\+C\+B}\label{classdev_1_1net_1_1_tcp_acceptor_a3ba04711a4120af7ba46157f8ba122c8}

\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
bool \hyperlink{classdev_1_1net_1_1_tcp_acceptor_a3f7e8ab49db7fa4b333430d0cf0f13ce}{open} (const char $\ast$addr, int port, int backlog)
\begin{DoxyCompactList}\small\item\em 打开接收器 \end{DoxyCompactList}\item 
\hypertarget{classdev_1_1net_1_1_tcp_acceptor_a0d5f08c91c23991236734ecd2d4909cb}{}bool \hyperlink{classdev_1_1net_1_1_tcp_acceptor_a0d5f08c91c23991236734ecd2d4909cb}{reopen} (void)\label{classdev_1_1net_1_1_tcp_acceptor_a0d5f08c91c23991236734ecd2d4909cb}

\begin{DoxyCompactList}\small\item\em 重新打开接收器 \end{DoxyCompactList}\item 
\hypertarget{classdev_1_1net_1_1_tcp_acceptor_a1e55a3bc5b17b5960419afe981c4b3f7}{}void {\bfseries close} (void)\label{classdev_1_1net_1_1_tcp_acceptor_a1e55a3bc5b17b5960419afe981c4b3f7}

\item 
\hypertarget{classdev_1_1net_1_1_tcp_acceptor_ae9531ec6fecdb6afc545d2cd513dc535}{}void {\bfseries shutdown} (void)\label{classdev_1_1net_1_1_tcp_acceptor_ae9531ec6fecdb6afc545d2cd513dc535}

\item 
\hypertarget{classdev_1_1net_1_1_tcp_acceptor_ad93eec19093d98d84aaa7f74486373f7}{}virtual void \hyperlink{classdev_1_1net_1_1_tcp_acceptor_ad93eec19093d98d84aaa7f74486373f7}{handle\+Input} (void)\label{classdev_1_1net_1_1_tcp_acceptor_ad93eec19093d98d84aaa7f74486373f7}

\begin{DoxyCompactList}\small\item\em 处理输入 \end{DoxyCompactList}\item 
\hypertarget{classdev_1_1net_1_1_tcp_acceptor_a8c313189b9166036e374750ddc64ea97}{}virtual void \hyperlink{classdev_1_1net_1_1_tcp_acceptor_a8c313189b9166036e374750ddc64ea97}{handle\+Output} (void)\label{classdev_1_1net_1_1_tcp_acceptor_a8c313189b9166036e374750ddc64ea97}

\begin{DoxyCompactList}\small\item\em 处理输出 \end{DoxyCompactList}\item 
\hypertarget{classdev_1_1net_1_1_tcp_acceptor_a3d97daf8df44b40efce078b3382f0ea5}{}virtual void \hyperlink{classdev_1_1net_1_1_tcp_acceptor_a3d97daf8df44b40efce078b3382f0ea5}{handle\+Exception} (void)\label{classdev_1_1net_1_1_tcp_acceptor_a3d97daf8df44b40efce078b3382f0ea5}

\begin{DoxyCompactList}\small\item\em 处理异常 \end{DoxyCompactList}\item 
\hypertarget{classdev_1_1net_1_1_tcp_acceptor_aef1361f3392c7757cc0fc0a13b15163d}{}virtual void \hyperlink{classdev_1_1net_1_1_tcp_acceptor_aef1361f3392c7757cc0fc0a13b15163d}{handle\+Close} (void)\label{classdev_1_1net_1_1_tcp_acceptor_aef1361f3392c7757cc0fc0a13b15163d}

\begin{DoxyCompactList}\small\item\em 处理关闭(套接字从反应器移除) \end{DoxyCompactList}\item 
\hypertarget{classdev_1_1net_1_1_tcp_acceptor_a0d160fee462b62035ad3fe1a641f4449}{}virtual void \hyperlink{classdev_1_1net_1_1_tcp_acceptor_a0d160fee462b62035ad3fe1a641f4449}{handle\+Heart\+Beat} (void)\label{classdev_1_1net_1_1_tcp_acceptor_a0d160fee462b62035ad3fe1a641f4449}

\begin{DoxyCompactList}\small\item\em 处理心跳 \end{DoxyCompactList}\item 
\hypertarget{classdev_1_1net_1_1_tcp_acceptor_ae41ca5857da0f0fe002a6030b81c8c29}{}void {\bfseries set\+Make\+Connection\+Callbck} (Rtn\+Tcp\+Connection\+Ptr\+Ref\+C\+B callback)\label{classdev_1_1net_1_1_tcp_acceptor_ae41ca5857da0f0fe002a6030b81c8c29}

\item 
\hypertarget{classdev_1_1net_1_1_tcp_acceptor_ab6dba62b674eff21a2e8c3f9c00223d9}{}void {\bfseries set\+Connection\+Established\+Callback} (Pass\+Tcp\+Connection\+Ptr\+Ref\+C\+B callback)\label{classdev_1_1net_1_1_tcp_acceptor_ab6dba62b674eff21a2e8c3f9c00223d9}

\item 
\hypertarget{classdev_1_1net_1_1_tcp_acceptor_a3533da8d23f611f9de8a40287333a2ed}{}\hyperlink{classdev_1_1net_1_1_socket}{Socket} \& {\bfseries get\+Socket} (void)\label{classdev_1_1net_1_1_tcp_acceptor_a3533da8d23f611f9de8a40287333a2ed}

\end{DoxyCompactItemize}
\subsection*{Friends}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classdev_1_1net_1_1_tcp_acceptor_a3ecf3132e8c4bf890c07853cfab7619c}{}class {\bfseries Tcp\+Server}\label{classdev_1_1net_1_1_tcp_acceptor_a3ecf3132e8c4bf890c07853cfab7619c}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Tcp连接接收器 

\subsection{Member Function Documentation}
\hypertarget{classdev_1_1net_1_1_tcp_acceptor_a3f7e8ab49db7fa4b333430d0cf0f13ce}{}\index{dev\+::net\+::\+Tcp\+Acceptor@{dev\+::net\+::\+Tcp\+Acceptor}!open@{open}}
\index{open@{open}!dev\+::net\+::\+Tcp\+Acceptor@{dev\+::net\+::\+Tcp\+Acceptor}}
\subsubsection[{open(const char $\ast$addr, int port, int backlog)}]{\setlength{\rightskip}{0pt plus 5cm}bool Tcp\+Acceptor\+::open (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{addr, }
\item[{int}]{port, }
\item[{int}]{backlog}
\end{DoxyParamCaption}
)}\label{classdev_1_1net_1_1_tcp_acceptor_a3f7e8ab49db7fa4b333430d0cf0f13ce}


打开接收器 


\begin{DoxyParams}{Parameters}
{\em addr} & 监听地址 \\
\hline
{\em port} & 监听端口 \\
\hline
{\em backlog} & 接收队列长度 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
bool 
\end{DoxyReturn}


The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
dev/dev/net/Tcp\+Acceptor.\+hpp\item 
dev/src/net/Tcp\+Acceptor.\+cpp\end{DoxyCompactItemize}
